package com.zhouyu.seven;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@Component
public class UserServiceSeven {

//
//	@Autowired
//	@Lazy
//	private OrderServiceSeven otherServiceSeven;

	@Value("123")
	private String otherServiceSeven1;

	@Value("${zhouyu}")
	private String otherServiceSeven2;

	@Value("#{zhouyu}")
	private String otherServiceSeven3;

	@Autowired
	private Map<String,OrderServiceSeven> orderServiceSevenList;

	@Autowired
	private OrderServiceInterface orderServiceInterface;

	@Autowired
	private OrderServiceSeven3 orderServiceSeven345;

	@Autowired
	@Qualifier("a")
	private QualifierBean qualifierBean;

	@Autowired
	@Random
	private LoadBalancer loadBalancer;

	@Resource
	private ResourceBean resourceBean;

//	@Value("123")
//	private OrderServiceSeven orderServiceSeven1;


	public void test(){
//		System.out.println(otherServiceSeven);
		System.out.println(otherServiceSeven1);
		System.out.println(otherServiceSeven2);
		System.out.println(otherServiceSeven3);
//		System.out.println(orderServiceSeven1);
		System.out.println(orderServiceSevenList);
		System.out.println(orderServiceInterface);
		System.out.println("orderServiceSeven3:" + orderServiceSeven345);
		System.out.println("qualifierBean:" + qualifierBean);
		System.out.println("loadBalancer:" + loadBalancer);
		System.out.println("resourceBean:" + resourceBean);
	}

}
